{include file='_header'}
<style>
    .popover{
        width:170px;
        font-size:12px;
        line-height: 21px;
        color: #0d0706;
    }
    .popover span{
        color: #b9b9b9;
    }
    .nickname{
        display: inline-block;
        max-width:200px;
        overflow: hidden;
        text-overflow:ellipsis;
        white-space: nowrap;
        vertical-align: middle;
    }

    .tooltip-inner{
        border:none;
    }
</style>
<div class="page-header">
    <span>当前位置：<span class="text-primary">意见反馈</span></span>
</div>
<div class="page-content">
   <form action="" method="get" class="form-horizontal" feedback="form">
        <div class="page-toolbar">
            <div class="col-sm-6">
            </div>			 
            <div class="col-sm-6 pull-right">		 		 
    			<div class="input-group">
                        <div class="input-group-select">
                            <select name="status" class='form-control'>
                                <option value="" {if $status == ''} selected{/if}>状态</option>
                                <option value="1" {if $status== '1'} selected{/if}>已处理</option>
                                <option value="0" {if $status == '0'} selected{/if}>未处理</option>
                            </select>
                        </div>
                        <input type="text" class="input-sm form-control" name='keyword' value="{$keyword}" placeholder="请输入关键词"> <span class="input-group-btn">

                     <button class="btn btn-primary" type="submit"> 搜索</button> </span>
                </div>
            </div>
        </div>
  </form>
 {if count($list)>0}
        <div class="page-table-header">
            <input type='checkbox' />
            <div class="btn-group">
                <button class="btn btn-default btn-sm btn-operation" type="button" data-toggle='batch' data-href="{:url('admin/system/feedbackstatus',array('status'=>1))}">
                    <i class='icow icow-qiyong'></i> 已处理</button>
                <button class="btn btn-default btn-sm btn-operation" type="button" data-toggle='batch'  data-href="{:url('admin/system/feedbackstatus',array('status'=>0))}">
                    <i class='icow icow-jinyong'></i> 未处理</button>
                <button class="btn btn-default btn-sm btn-operation" type="button" data-toggle='batch-remove' data-confirm="确认要删除?" data-href="{:url('admin/system/feedbackdelete')}">
                    <i class='icow icow-shanchu1'></i> 删除</button>
            </div>
        </div>
        <table class="table table-hover  table-responsive">
            <thead>
                <tr>
                    <th style="width:25px;"></th>
                    <th style="width:250px;">会员</th>
                    <th>意见</th>
                    <th style="width:85px;">状态</th>
                    <th style="width: 95px;">操作</th>
                </tr>
            </thead>
            <tbody>
                {foreach name='list' item='row'}
                <tr  data-toggle='popover' data-html='true' data-placement='top' data-trigger='hover' data-content='{$row['desc']}'>
                    <td><input type='checkbox' value="{$row['id']}"/></td>
                    <td style="overflow: visible">
                        <div rel="pop" style="display: flex"  data-content=" <span>ID: </span>{$row['mid']} </br>
                        <span>真实姓名：</span> {if empty($row['realname'])}未填写{else}{$row['realname']}{/if}
                        <br/>
                        <span>手机号：</span>{if !empty($row['mobileverify'])}{$row['mobile']}{else}未绑定{/if} <br/>
                        <span>状态:</span>  {if $row['isblack']==1}黑名单{else}正常{/if} ">
                           <img class="img-40" src="{$row['avatar']}" style='border-radius:50%;border:1px solid #efefef;' onerror="this.src='/public/static/images/noface.png'" />
                           <span style="display: flex;flex-direction: column;justify-content: center;align-items: flex-start;padding-left: 5px">
                               <span class="nickname">
                                   {if empty($row['nickname'])}未更新{else}{$row['nickname']}{/if}
                               </span>
                               {if $row['isblack']==1}
                                    <span class="text-danger">黑名单<i class="icow icow-heimingdan1"style="color: #db2228;margin-left: 2px;font-size: 13px;"></i></span>
                               {/if}
                           </span>
                        </div>
                    </td>
                    <td>{$row['desc']}</td>                            
                     <td>
                       <span class='label {if $row['status']==1}label-primary{else}label-danger{/if}'
							  data-toggle='ajaxSwitch' 
							  data-switch-value='{$row['status']}'
							  data-switch-value0='0|已处理|label label-danger|{:url('admin/system/feedbackstatus',array('status'=>1,'id'=>$row['id']))}'  
							  data-switch-value1='1|未处理|label label-success|{:url('admin/system/feedbackstatus',array('status'=>0,'id'=>$row['id']))}'  
							>
							{if $row['status']==1}已处理{else}未处理{/if}</span>
                    </td>
                    <td>
                        <a class='btn btn-default btn-sm btn-operation btn-op' href="{:url('admin/system/feedbackdetail', array('id' => $row['id']))}">
                         <span data-toggle="tooltip" data-placement="top" title="" data-original-title="查看">
                            <i class="icow icow-bianji2"></i>
                         </span>
                        </a>
                        <a class='btn btn-default  btn-sm btn-operation btn-op' data-toggle="ajaxRemove"  href="{:url('admin/system/feedbackdelete', array('id' => $row['id']))}" data-confirm="确认删除此权限吗？">
                          <span data-toggle="tooltip" data-placement="top" title="" data-original-title="删除">
                                    <i class='icow icow-shanchu1'></i>
                               </span>
                        </a>
                    </td>
                </tr>
                {/foreach}               
            </tbody>
            <tfoot>
                <tr>
                    <td><input type="checkbox"></td>
                    <td>
                        <div class="input-group-btn">
                            <button class="btn btn-default btn-sm btn-operation" type="button" data-toggle='batch' data-href="{:url('admin/system/feedbackstatus',array('status'=>1))}">
                                <i class='icow icow-qiyong'></i> 已处理</button>
                            <button class="btn btn-default btn-sm btn-operation" type="button" data-toggle='batch'  data-href="{:url('admin/system/feedbackstatus',array('status'=>0))}">
                                <i class='icow icow-jinyong'></i> 未处理</button>
                            <button class="btn btn-default btn-sm btn-operation" type="button" data-toggle='batch-remove' data-confirm="确认要删除?" data-href="{:url('admin/system/feedbackdelete')}">
                                <i class='icow icow-shanchu1'></i> 删除</button>
                        </div>
                    </td>
                    <td colspan="3" class="text-right"> {$pager}</td>
                </tr>
            </tfoot>
        </table>
    {else}
<div class='panel panel-default'>
	<div class='panel-body' style='text-align: center;padding:30px;'>
		 暂时没有任何意见反馈!
	</div>
</div>
{/if}
       </form>
</div>
{include file='_footer'}